<!-- $Id: payment_edit.htm 14401 2008-04-15 02:41:32Z zhuwenyuan $ -->
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,validator.js"}
<!-- directory install start -->
<ul id="lilist" style="padding:0; margin: 0; list-style-type:none; color: #CC0000;">
  {foreach from=$warning_arr item=warning}
  <li style="border: 1px solid #CC0000; background: #FFFFCC; padding: 10px; margin-bottom: 5px;" >{$warning}</li>
  {/foreach}
</ul>
<div class="list-div">
<form method="post" action="feyin.php" name="theForm"
	onsubmit="return validate()">
<table cellpadding='3' cellspacing='1'>
	<tr>
		<th colspan="6">{$lang.feyin_interface}</th>
	</tr>
	<tr>
		<td colspan="2"><strong>{$lang.feyin_switch}</strong><br />
		{$lang.feyin_switch_note}</td>
		<td colspan="4"><input type="radio" name="feyin_switch" id="feyin_switch" value="1" onclick="changeReadonly();" {$feyin_switch_yes} />{$lang.yes}<input
			type="radio" name="feyin_switch" id="feyin_switch" value="0" onclick="changeReadonly();" {$feyin_switch_fail} />{$lang.no}</td>
	</tr>
	<tr>
		<th>安装地址</th>
		<th>启用日期</th>
		<th>最后在线时间</th>
		<th>设备状态</th>
		<th>纸张状态</th>
	</tr>
	<tr>
		{foreach from=$feyin_device item=device_item}
		<td align="center">{$device_item}</td>
		{/foreach}
	</tr>
	<tr>
		<th colspan="6">{$lang.feyin_parameter}</th>
	</tr>
	<tr>
		<td colspan="2"><strong>{$lang.feyin_API}</strong><br />
		{$lang.feyin_API_note}</td>
		<td colspan="4"><input type="text" name="feyin_API" id="feyin_API" value="{$feyin_API}" /></td>
	</tr>
	<tr>
		<td colspan="2"><strong>{$lang.feyin_code}</strong><br />
		{$lang.feyin_code_note}</td>
		<td colspan="4"><input type="text" name="feyin_code" id="feyin_code" value="{$feyin_code}" /></td>
	</tr>
	<tr>
		<td colspan="2"><strong>{$lang.feyin_deviceNo}</strong><br />
		{$lang.feyin_deviceNo_note}</td>
		<td colspan="4"><input type="text" name="feyin_deviceNo" id="feyin_deviceNo" value="{$feyin_deviceNo}" /></td>
	</tr>
	<tr>
		<td colspan="2"><strong>{$lang.feyin_printf_number}</strong><br />
		{$lang.feyin_printf_number}</td>
		<td colspan="4"><input type="text" name="feyin_printf_number" id="feyin_printf_number" value="{$feyin_printf_number}" /></td>
	</tr>
	<tr>
		<td colspan="6" align="center"><input type="hidden" name="act"
			value="save_config" /><input type="submit" value="保存设置"
			class="button" /></td>
	</tr>
</form>

<form method="post" action="feyin.php" name="theForm"
	onsubmit="return validate()">
<table cellpadding='3' cellspacing='1'>
	<tr>
		<th colspan="6">{$lang.feyin_log}({$lang.feyin_log_note})</th>
	</tr>
		{foreach from=$feyin_log item=feyin_log_list}
	<tr>
		<td colspan="6" align="center">{$feyin_log_list}</td>
	</tr>
		{/foreach}
	<tr>
		<td colspan="6" align="center"><input type="hidden" name="act"
			value="clean_log" /><input type="submit" value="清除日志"
			class="button" /></td>
	</tr>
</table>
</div>

<script type="text/javascript">
	var feyin_switch = document.getElementById("feyin_switch");
	var feyin_API = document.getElementById("feyin_API");
	var feyin_code = document.getElementById("feyin_code");
	var feyin_deviceNo = document.getElementById("feyin_deviceNo");
	var feyin_printf_number = document.getElementById("feyin_printf_number");
	if (!feyin_switch.checked) {
		feyin_API.setAttribute("readonly","readonly");
		feyin_API.style.backgroundColor="#BDBDBD";
		feyin_code.setAttribute("readonly","readonly");
		feyin_code.style.backgroundColor="#BDBDBD";
		feyin_deviceNo.setAttribute("readonly","readonly");
		feyin_deviceNo.style.backgroundColor="#BDBDBD";
		feyin_printf_number.setAttribute("readonly","readonly");
		feyin_printf_number.style.backgroundColor="#BDBDBD";
	} else {
		feyin_API.removeAttribute("readonly");
		feyin_API.style.backgroundColor="";
		feyin_code.removeAttribute("readonly");
		feyin_code.style.backgroundColor="";
		feyin_deviceNo.removeAttribute("readonly");
		feyin_deviceNo.style.backgroundColor="";
		feyin_printf_number.removeAttribute("readonly");
		feyin_printf_number.style.backgroundColor="";
	}
	function changeReadonly() {
		var feyin_switch = document.getElementById("feyin_switch");
		var feyin_API = document.getElementById("feyin_API");
		var feyin_code = document.getElementById("feyin_code");
		var feyin_deviceNo = document.getElementById("feyin_deviceNo");
		var feyin_printf_number = document.getElementById("feyin_printf_number");
		if (!feyin_switch.checked) {
			feyin_API.setAttribute("readonly","readonly");
			feyin_API.style.backgroundColor="#BDBDBD";
			feyin_code.setAttribute("readonly","readonly");
			feyin_code.style.backgroundColor="#BDBDBD";
			feyin_deviceNo.setAttribute("readonly","readonly");
			feyin_deviceNo.style.backgroundColor="#BDBDBD";
			feyin_printf_number.setAttribute("readonly","readonly");
			feyin_printf_number.style.backgroundColor="#BDBDBD";
		} else {
			feyin_API.removeAttribute("readonly");
			feyin_API.style.backgroundColor="";
			feyin_code.removeAttribute("readonly");
			feyin_code.style.backgroundColor="";
			feyin_deviceNo.removeAttribute("readonly");
			feyin_deviceNo.style.backgroundColor="";
			feyin_printf_number.removeAttribute("readonly");
			feyin_printf_number.style.backgroundColor="";
		}
	}
</script>
{include file="pagefooter.htm"}